package com.xyb.controller;

import com.xyb.entity.OssToken;
import com.xyb.utils.OSSTokenUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("oss")
public class OSSController {
    @Resource
    private OSSTokenUtils ossTokenUtils;

    @GetMapping("token")
    public OssToken getOssInfo(){
        OssToken ossToken = ossTokenUtils.getOssToken();
        return ossToken;
    }
}